Mobile Cloud Computing is one of the most prominent future mobile technology infrastructures, because it accumulates the benefits of mobile computing and cloud computing, and provides optimized services for users. In a distributed database system in the cloud, the connections necessary for a query layout may be stored in multiple sites, increasing the number of equivalent designs possible in the search for an optimal query implementation plan. However, a thorough search of all possible designs in such a large search space is not computationally rational. In this study, our goal is to identify a cost model consisting of a multi-objective function with variable (and possibly conflicting) QoS parameters to solve the query optimization problem in inhomogeneous cloud databases (in terms of pricing models) and mobile. Then, we propose a new strategy for the optimization of queries in these environments using the Learning Based Optimization (TLBO) algorithm. Finally, the results are evaluated in the CloudSim environment and compared with genetic optimization and ant colony optimization (ACO).